Program code for execution on computer systems may be written in a computer language. The program code may be translated into generic machine code to make it executable by a computer system. The translation of the program code may, for example, be realized via a separate compiler program. The compiler program may automatically generate generic machine code for a specific computer system. This generic machine code may be optimized by the compiler program to take advantage of specific features of the computer system that may accelerate the execution of the generic machine code. The automatic optimization of the machine code may be very difficult due to the complexity of the original program code, and there are many different strategies for the optimizing process, for example, a modulo scheduling algorithm for optimizing loops.
U.S. Pat. No. 6,571,385 describes an algorithm for optimizing loops having more than one exit. The described algorithm is based on a predication for each exit. Each of the used predications is examined when the loop is left to determine the exit condition.
U.S. Pat. No. 6,016,399 describes an iterative scheduling algorithm for a loop. The scheduling algorithm is based on percolating instructions into previous loop iterations.
Parthasarathy P. Tirumalai, M. Lee, Michael S. Schlansker, “Parallelization of loops with exits on pipelined architectures”, SC., pp 200-212, 1990 describes a method for transforming a loop with a plurality of exits into a loop with a single exit prior to applying the optimization.